An embedded interfacial network stabilizes inorganic CsPbI3 perovskite thin films

The black perovskite phase of CsPbI3 is promising for optoelectronic applications; however, it is unstable under ambient conditions, transforming within minutes into an optically inactive yellow phase, a fact that has so far prevented its widespread adoption. Here we use coarse photolithography to embed a PbI2-based interfacial microstructure into otherwise-unstable CsPbI3 perovskite thin films and devices. Films fitted with a tessellating microgrid are rendered resistant to moisture-triggered decay and exhibit enhanced long-term stability of the black phase (beyond 2.5 years in a dry environment), due to increasing the phase transition energy barrier and limiting the spread of potential yellow phase formation to structurally isolated domains of the grid. This stabilizing effect is readily achieved at the device level, where unencapsulated CsPbI3 perovskite photodetectors display ambient-stable operation. These findings provide insights into the nature of phase destabilization in emerging CsPbI3 perovskite devices and demonstrate an effective stabilization procedure which is entirely orthogonal to existing approaches.


Supplementary Note 1. Baseline stability of conventional solution-processed CsPbI3 thin films
Materials under investigation: Both micron-scale, free-standing crystals (made using drop casting) and spin coated polycrystalline thin films of CsPbI3 are fabricated (Fig. S1) and tested to reference the enhanced stability gained from fabricating thin films.
Baseline stability: We examine both bulk vs thin film stability shortly after thermal quenching under both ambient and nitrogen atmospheres (Fig. S2). The CsPbI3 materials underwent a thermal quenching procedure and were placed under an optical microscope (Leica DMS300) for monitoring immediately after. A nitrogen atmosphere was introduced using a dispersive gas outlet which submerged the sample in free space.
After thermally quenching under both ambient and inert atmospheres (Fig. S2), free-standing bulk CsPbI3 crystals turn yellow within tens of seconds under both environments. Thin films exposed to the same treatment last significantly longer due to the stabilizing effect of substrate clamping (1), taking roughly 40 minutes to fully transition yellow in an ambient atmosphere (42% RH) and over 10 hours when evaluated under nitrogen gas flow. Tracking the degree of black-toyellow transformation with time ( Fig. S3), we find that moisture accelerates phase decay in black CsPbI3 thin films.
We aim to integrate our stabilizing technology within routine solution-processing methods; therefore, these data provide the baseline for which we stabilize the 200 nm-thick CsPbI3 thin films using photolithographic patterning.  Beyond the role of strain-induced stabilization in the thermally treated film, the relatively small grains in the thin film (50-200 nm) also has an additional stabilizing effect on the perovskite phase, due to a difference in the surface energy contributions of the competing γ-CsPbI3 perovskite and δ-CsPbI3 non-perovskite phases (2). This is, in part, important for the phase stability comparison carried out here, which constitutes a benchmark result to be improved on throughout this study.

Fig. S3.
Temporal stability of black thin films stored under ambient (40-44%RH) and inert (nitrogen) atmosphere. These data were derived of a time-dependent image threshold analysis of the transformations imaged in Fig. S2. Fits to the experimental data (solid lines) are made using the standard JMAK model.

Supplementary Note 2. Simulations of surface octahedral restraint
MD simulations: Periodic simulation cells were used to track the Pb-I-Pb bond angles of the CsPbI3 slab during the MD simulations, performed using CP2K (3), as shown in Fig. S4 for the four-layer model. The simulation cells were constructed from a 4x4x4 and 8x4x4 supercell of the conventional unit cell and a vacuum of 15 and 10 Å respectively to ensure that there are no periodic interactions in the z-direction. The lattice vector in the z-direction remained fixed for all calculations. To terminate the slab extra I⁻ anions are added to preserve the PbI octahedra. To maintain charge neutrality the same number of Cs⁺ cations are added. The resultant relative dimension the simulated slab to the vacuum layer was 25 Å: 15 Å and 50 Å: 10 Å for the four-and eight-layer cells, respectively.
For each simulation, the reported bond angles are divided in 3 groups depending on their orientation with respect to the applied interface (at z=0), which is defined by the orientation of the Pb-I bonds in the initial α-phase (Fig. S4). Apart from using the slab model to study the effect of a variable constraint on the bond angle distribution (see Fig. 1C in the main text), we also investigated various other effects:

Details of approach (I):
The effect of fixing the cell vectors, either at their equilibrium values at 300 K or 600 K, on the distribution of the bond angles is investigated using three independent simulations: one simulation with free cell vectors at 300 K (NPT ensemble), and two simulations with fixed cell vectors, one at 300 K and one at 600 K (NVT ensemble). For the MD simulation with free cell vectors at 300 K, there is a large difference between the bond angles oriented in the x and y directions (θx and θy), as shown in Fig. S6. This is the result of different octahedral tilting occurring in both directions at 300 K, as the rotation around the x-axis to go from the β-phase to the γ-phase, and effects θy and not θx.
In a second simulation, the lattice vectors were fixed to their average value at 300 K and this restraint partly inhibits the octahedral tilting observed in the free material, leading to larger bond angles oriented in the y and z directions and slightly smaller bond angles in the x direction. Thus, to further mimic the experimental lattice anchoring while strained due to a thermal expansion mismatch with the substrate, in a third simulation the lattice vectors are constrained to their value at 600 K. This is the corresponding temperature at which the perovskite structure is formed in the film and establishes an interface with the underlying substrate, which contracts much slower than the perovskite upon cooling, causing strain (1). In this case, Fig. S7 shows that the angles increase for both the strained in-plane directions (θx and θy) and for the perpendicular, out-of-plane direction (αz), with respect to the 300 K situation in which the lattice vectors are free to move.

Details of approach (II):
The Ianions in the bottom layer of the four-layer slab were kept fixed in addition to fixing the lattice vectors in the x and y directions to their average value at 300 K. A harmonic restraining potential V = Kd² was applied to all Ianions in one layer as shown in Fig. 1C of the main text, with K being the strength of the restraint and d the distance from their initial positions. For K = 0, the Ianions at the interface are free to move as normal. Fig. S8 shows the Pb-I-Pb bond angle distributions as obtained from this simulation, contrasting them to those values obtained in the prior MD simulation where the Ianions are free to move but the lattice vectors are fixed on their 300 K values. These data further lead to varied bond angle energies in Fig. S9. One observes a large positive effect for the out-of-plane bond angles and a negligible effect for the in-plane bond angles due to the rotational freedom around the z-axis. The effect is the largest for the first layer and decreases for layers further from the restraint plane (Fig. S10B), giving a first indication of the range over which this restrain stabilizes the material.
Large eight-layer slab calculations: Due to the limited size of the four-layer slab, it is not optimal to examine how the interface effects translate through the CsPbI3 layers from Fig. 1C in the main text alone. Therefore, those calculations were also performed for an eight-layer slab of CsPbI3 in which the Ianions at the bottom were restrained with a harmonic bias potential V = Kd², with K = 1000 kJ mol -1 Å -2 and d the distance between the initial and actual positions of the Ianions (Fig. S10B).
Depth profile analysis of surface restraint: Considering layer-by-layer how the Pb-I-Pb angles are influenced beyond the anchored surface atoms (Fig. S10), a depth profile analysis suggests that the tilts are restricted only over a short range, vanishing after a few layers beyond the surface. Crystal surfaces generally contain the tail ends of structure-property distributions, including bonding angles, which facilitate nucleation sites for phase transitions.   Figure S1. Raw data is presented early on in the simulation to show the rapid drop average bond angle when starting from an initial cubic structure (bond angle of 180) of the four-layer CsPbI3 slab at 300 K. The black lines represent the results for the simulation where CsPbI3 was free and the red traces represent the results where the in-plane a and b lattice vectors were kept fixed to the values determined during a MD simulation at 300K.  Distribution of Pb-I-Pb bond angles within simulated crystals experiencing a varying degree of surface restrain K, expressed in kJ mol -1 Å -2 . The low-angle portion of the distribution becomes heavy skewed with the application of higher restrains (highlight by a horizontal arrow), significantly shifting the tail end of the low-angle shoulder.

Fig. S8.
Distribution and average value of the Pb-I-Pb bond angles oriented in the x, y, and z directions during MD simulations of a four-layer CsPbI3 slab where the lattice vectors were free or kept fixed at their average value at 300 K or 600 K. The Ianions could move freely in these simulations. By fixing the lattice vector to values determined at higher temperatures, these calculations mimic the influence of strain due to substrate clamping of a high-temperature processed perovskite thin film which undertakes a much faster thermal expansion rate than the underlying transparent substrate (1) (i.e. glass). Here T is temperature and kb represents the Boltzmann constant. For small angles (αz<150°), the free energy difference compared to the ground state increases when K increases (highlight by a vertical arrow), indicating that it becomes less probable for the system to transition to the yellow phase structure.

Fig. S10.
Distribution and average value of the out-of-plane Pb-I-Pb bond angles during MD simulations of (A) four-layer and (B) eight-layer CsPbI3 slabs, as a function of the distance with respect to the interface (layer 0). The lattice vectors were kept fixed at their 300 K values and the Ianions at the bottom were either free to move or were restrained.

Supplementary Note 3. Thermal and photo-thermal decomposition of CsPbI3
In situ GIWAXS studies of high-temperature decomposition in thin film CsPbI3: The thermal decomposition of CsPbI3 was tracked using in situ GIWAXS (Fig. S12). The high temperatures were ramp in two different stages using a heated N2 gas blower, with the slower ramp (5 °C/min) persisting during the material decomposition. Using the different scattering signals which arise during the high temperatures a species evolution t-T plot is derived (Fig. S12B). PbI2 forms relatively early in the evolution, explaining why use of high temperatures (330 °C) to access the perovskite phase in the thin films inevitably introduces trace amounts of endogenous PbI2 into the black thin film (Fig. S13).
Photo-thermal decomposition of bulk CsPbI3 powders: Intense, focused 532 nm laser light implemented in a Raman backscattering microscope was used to promote the laser heating in bulk, free-standing CsPbI3 crystals. For this study, we choose laser light which is below the bandgap of δ-CsPbI3 (Fig. S14) to slow down the energy transfer process, and better resolved the laser heating evolution. Further, bulk powders allowed for more intense Raman signals and thus clearer characterization of the expected laser heated products (Fig. S15). Given that 532 nm laser light is used for excitation (photon energy=2.3 eV), the photolytically activated influences (photoninduced bond breaking and chemical decomposition) are assumed negligible compared to the thermally driven process (radiative transfer). After each irradiation dose (scaled using both laser power and time parameters), the subsequent decomposition was recorded via Raman scattering in the same position using low laser power. High intensity exposures notably made the collection of CsPbI3 needle-like material partially ablate and turn black (Fig. S17).

Fig. S11.
Schematic illustration of the scattering geometry of synchrotron-based GIWAXS measurements performed on CsPbI3 thin films. The incident X-ray beam (λ = 0.95774 Å) scatters from the sample under a grazing angle (αi), projecting ring-shaped diffraction signals onto the larger-area imaging detector which can sample with a high temporal resolution (0.1 -0.4 frame/s). The sample temperature is controlled through its immersion at the centre of a heated N2 gas flow which has been calibrated using a reference silver crystal. Depending on the polycrystalline texture and anisotropic (micro)structure (i.e. biaxial strain), the in-plane (qxy) and out-of-plane (qz) scattering vectors and intensities may differ, differences which are resolved by selectively evaluating the relevant scattering axes in the azimuthal domain, χ. Only scattering signals derived from integrating over the whole image (i.e. qxyz) are used for structural refinements. GIWAXS t-T profile (qx,y,z) of CsPbI3 thin film through a high-temperature yellow to black phase transition, followed by a further increase in temperature toward material degradation. The start of the first heating is roughly 30 °C/min and the second is 5 °C/min. Top: waterfall plot of scattering pattern. Bottom: Intensity profile of identified degrading species.

Fig. S13.
Comparison of GIWAXS scans recorded from a CsPbI3 thin films before and after thermal quenching (annealing temperature of 330°C for 1 minute), highlighting (*) the detection of new PbI2-related peaks. These data have been baseline corrected and normalized, for clarity.

Fig. S14.
Absorption spectra recorded in reflection mode from the surface of yellow and black CsPbI3 thin films, along with the relative position of various excitation wavelengths used in throughout the work for comparison.

Fig. S15.
Power dependence of laser-induced surface heating of bulk δ-CsPbI3 powders using 532 nm excitation source (10 mW) focused with a 0.25 NA objective, with the laser dose parametrized by time and reduced power faction (controlled by ND filters). Raman spectra are collected using low 532 nm laser power (<0.1%) from the sample surface after exposure to laser heating dose. These data have been normalized and offset, with the vertical lines providing mode assignment (pure PbI2 and PbO2; Figure S16). Under an ambient atmosphere, δ-CsPbI3 first decomposes into PbI2 and then forms a dark ablated lead oxide at higher laser powers.

Fig. S16.
Normalized RT Raman scattering spectra of potential degradation products of CsPbI3 when heated in the presence of ambient oxygen. Note the Raman scattering signal from RT black γ-CsPbI3 yields a broad luminescent background using 532 nm excitation, rather than clear Raman active bands. Likewise, the ionic CsI crystal only exhibit a strong central quasi-elastic band and is also included for completeness.

Fig. S17.
Optical image recorded after bulk CsPbI3 powder is exposed to high power 532 nm laser irradiation two times (dark circular regions to the left and right).

Supplementary Note 4. Photolithographic patterning of thin films and examination of the physical changes
Controlled photolithographic patterning: As-grown CsPbI3 thin film surfaces were laser processed using above bandgap 458 nm cw-laser light for efficient energy transfer and the ability to rapidly pattern (10 mm/s) and minimize processing footprint across the final optoelectronic thin film surface. A laser microscope was used for the patterning (simplified scheme shown in Fig.  S18). To confirm that the Gaussian microprobe spot sizes neared the diffraction limit, an optical beam expander was placed before the microscope optics used to focus light onto the sample (UPLXAPO10X ×10, 0.4NA objective). The motorized XYZ stage (Märzhäuser Wetzlar) of the microscope enabled precise sample manipulation and laser light was visualized to focus on the sample surface through a video camera/beam splitter assembly. With the thin film surfaced levelled relative the processing plane, the laser spot was moved and translated by a series of XYZ coordinates controlled by a computer, with a patterning speed of 10 mm/s. The power density of the focused laser spot was controlled via a laser current supply module and selecting the appropriate neutral-density filter on a computer-controlled wheel and was measured using a calibrated power meter (ThorLabs photodiode S130VC). A Gaussian shaped incident beam is confirmed via scattering across the edge of cleaved Si wafer and the power density values were calculated for the 1/e 2 (13.5% of peak) beam diameter.
Photolithography power dependence: Microgrids are fabricated using different laser power and their topologies are recorded using AFM (Fig. S19). The degree of structural ablation on the thin film surface is evaluated by line scans taken across micro-processed tracks. A photolithographic pattern can be formed without significantly oxidizing/ablating the film surface using a laser power density of 300 W/cm 2 (at 10 mm/s), which is implemented to micropattern thin films in the main text.
Local phase kinetics of square array: A sequence of 50 μm squares were patterned on the thin film surface using a laser power density of 300 W/cm 2 (10 mm/s). The films were then thermally quenched and monitored in an ambient environment using an optical microscope.
Raman spectroscopy characterization: Raman microscopy (785 nm excitation) is used to probe three areas across the microprocessed area in Fig. 2B of the main text. The results are compared to relevant reference data; in situ high-temperature Raman spectroscopy (Fig. S21), DFT calculations (Fig. S22), and the Raman spectra of pure products (Fig. S23). An expansion of the RT black-phase Raman spectrum recorded from the stable interior of the microprocessed area (Fig.  S24) yields fourth-order Raman modes. These high-energy vibrational signatures are also used for phase identification but are not captured in the first-order Raman DFT calculation ( Figure S22).

GIWAXS characterization of δ-CsPbI3 with embedded microgrid:
A section of a δ-CsPbI3 thin film was laser patterned (5×5 mm 2 ) area using a relatively tight square grid spacing of 10 µm to maximize microgrid-related structural signals. GIWAXS recorded on and off the microgrid verifies PbI2-related signals to contribute to the scattering pattern recorded from micro-processed δ-CsPbI3 thin films ( Figure S25).

Fig. S18.
Schematic diagram of the laser processing instrument used. The sample area is exposed to an ambient environment. An objective with relatively low magnification and NA (0.4) is used to focus 458 nm laser light in the absence of z-tracking. This increases the depth of field and overall tolerance to changes in height across large film areas.  Optical images recorded under an ambient atmosphere (42% RH) after thermally quenching a 50 μm square micro-processed array, which is the wider view of the data shown in Figure 2D.

Fig. S21.
Raman spectra (785 nm) recorded in situ from bulk CsPbI3 as it is heated to its black phase and then cooled back to RT, returning it to its thermodynamically preferred yellow phase.

Fig. S22.
Comparison of normalized experimental and calculated Raman spectra. (A) Raman scattering spectrum of the high-temperature bulk CsPbI3 powders while it is in the black phase at 325°C, using 785 nm excitation. The rescaled trace highlights the high-energy Raman mode seen near 250 cm-1, which far above the first order spectrum predicted by DFT. (B) Raman scattering spectrum of the RT bulk CsPbI3 powders while it is in the yellow phase, using both 532 nm and 785 nm excitation. The simulated Raman modes and spectra are generated using a broadening function (fwhm = 10 cm -1 ), and rescaled using a factor of 1.1 to align their frequencies with the experimentally observed spectra.

Fig. S23.
Normalized Raman scattering spectra of yellow and black phase CsPbI3, and PbI2, using 785 nm excitation.

Fig. S24.
A rescaling of the Raman spectrum recorded from the stabilised black phase depicted in Figure 2b of the main text. The observation of prominent higher order Raman scattering of optical modes is highlighted in the inset, up to a fourth-order mode. The second-order mode here is used to further verify the presence of black perovskite phase within the stabilized microgrid.

Fig. S25.
Comparison of GIWAXS scans recorded from a yellow CsPbI3 thin films on and off a laser processed area (a large-area microgrid with a spacing of 10 µm). Peaks are highlighted (*) to show the detection of PbI2-related signals. These data have been baseline corrected and normalized, for clarity.

Supplementary Note 5. Size-dependent phase kinetics of microgrid sample stability
Size-dependence of microgrid phase stability: Photolithographic patterns of 14×14 gridded squares make up small-scale areas for testing the size-dependent stability of the microgrid. In this way, each sampled area has a 2 square buffer left on the perimeter which is not considered and the interior 10×10 squares are evaluated and counted out of 100 over time. For each grid size, the stability of corresponding patterns is studied while stored over time under an unregulated ambient atmosphere (between 42-48%RH for these experiments). With decreasing size, the microgrid becomes more stable, as shown in the size-time image matrix in Fig. S26.
The fraction of decaying grid squares with time are used to develop Avrami plots for the black to yellow phase transformation. This is compared to as-grown thin films (Fig. S27). As outlined in the main text, two regimes govern transformations of the laser patterned thin films; early on the processed films follow the trend of the as-grown samples (regime I) and later on the microgrid quenches further spread of the phase decay (regime II). The overall system is limited to its lowest activation barrier, given that spatial heterogeneity exists across the grainy thin film surface and a yellow phase wave front can easily propagate inter-granularly once triggered. With an approximately constant nucleation density (per unit area) across the thin film a large portion of the supressed reaction is related to the decreasing volume in which each nucleation event can spread and transform the surrounding film, due to the structural isolation of each square.
In situ fluorescent microscopy of microgrid phase stability: To better visualize the phase evolution across a decaying black-phase thin film, optical transmission and fluorescence images (488 nm) were recorded in situ while a processed film is slowly heated to 330°C and then cooled under an ambient atmosphere (Fig. S28). The film is tracked for over roughly an hour (under constant scanning 488 nm laser) showing non-local phase behavior near the microgrid shortly after cooling. The processed tracks distinctly interrupt the normal evolution of the phase decay, helping to stabilize regions of the film sometimes up to millimeters away from gridded areas, while remaining linked by continuous regions of black perovskite phase.   Avrami plots for the black to yellow phase transformation in as-grown and micro-processed thin films using different grid dimensions. The linear fits to these plots are made for ln(t) values higher than the as-grown trend line (in regime II), given that before this time (i.e. before the broken vertical lines) the boundary of the grid on average has not yet inhibited the spread of the yellow phase.
In regime II, the changing fraction of transformed yellow phase (f) exhibits Avrami-like behavior, given that linear trends are exhibited with time (i.e. unchanging dynamics). The linear fit here is governed by the Johnson-Mehl-Avrami-Kolmogorov (JMAK) equation: ln[-ln(1-f)] = ln(k) + n×ln(t). Thus, the y-intercept, ln(t) = 0, of the Avrami plot yields the logarithm of the rate constant, k, which are compared in Fig. 3d of the main text.

Supplementary Note 6. Long-term stability of microprocessed thin films
Long-term stability test: To maximize the remaining area of the optically active film surface, long-term stability testing is performed on 40 µm grids, which leaves ~73% of the film optically active when patterned using a processing footprint of ~4 µm (i.e. the width of the photolithography track). Processed thin films exhibit a strong resistance to ambient conditions compared to their asgrown counterparts. To quantify this over time, the stability of 10×10 grids were evaluated after thermal quenching the black phase. Samples were stored in both ambient (Fig. S29) and dry atmospheres ( Fig. 30; samples were sealed in an dry optical imaging mount and held in larger desiccator) and periodically imaged in an optical microscope. Light shielding was not implemented and the samples were left on benchtops of the laboratory (in Leuven, Belgium). For ambient storage, the unregulated RH varied between 25-60% and near day 110 of testing, widespread discoloration (moisture damage; Fig. S31) prevented the study from continuing.
Patterning on device-ready substrates: To confirm that our microgrid stabilizations strategy is a general one, we embedded 40 µm grids into thin film deposited onto ITO substrates (Fig. S32). In this scenario, after 24 hours of ambient storage, the microgrid has prevented phase decay.
Selective destabilization in a black CsPbI3 perovskite microgrid: An important feature of the microgrid is the restricted connectivity of the gridded polycrystalline network, which isolates destabilization events and prevents them spreading. To clearly show this aspect, focused light is used to promote a controlled nucleation event in a stable black microgrid film, akin to a spontaneous nucleation. Optical images then track the subsequent yellow phase evolution as it cascades out from the triggering point, forming a radial-like wave (Fig. S33). The same localized nucleation procedure can be used to control the phase of targeted perovskites blocks across a microgridded film and generate pixelated images (Fig. 3A of main text).    Optical images of CsPbI3 thin film spin coat onto ITO covered substrates and processed with three 40 µm grid patterns. The sample was annealed, and the black phase thermally quenched to RT, then stored under an ambient environment (~45% RH) for 24 hours before recording the image.   Corresponding optical images of the temporal phase evolution (t ≥ 0 s) after yellow-phase nucleation is triggered by focused laser light (488 nm at ~2kW/cm 2 ).

Supplementary Note 7. Scaled, large-area patterning and characterization of the embedded interface
Photolithographic patterning at the wafer-scale: The same processing parameters are used to pattern a 2×2 cm 2 microgrid area of a wafer; 40 μm grid size, 458 nm laser excitation with 300 kW/cm2 power and a scanning speed of 10 mm/s. This process took roughly 45 minute per film. A photograph of such a film is shown in Fig. 3B of the main text.
Optical properties of microgrid: High-resolution optical characterization of the perovskite thin film embedded with a microgrid was carried out to see the impact of the introduced interface. Steady-state and time resolved photoluminescence microscopy studies were used to detect changes near the bordering microgrid (Fig. S35). Importantly, no detectable changes were recorded in the stabilized film due to the introduction of the photolithography pattern. This is consistent with the well-known passivating role that additive PbI2 has on traps in lead iodide perovskites.
Studies of the embedded interface using GIWAXS: Mesostructure across large grain populations, i.e. with respect to their size, shape, and orientation, can arise over lengths of hundreds of nanometers. For synchrotron XRD experiments employing large-area 2D detectors, this information is encoded in the shape, width, and azimuthal angular distribution of Debye-Scherrer diffraction rings. A grazing incidence geometry (Fig. 11) is used to record the scattering signals of black CsPbI3 thin films with and without a microgrid (Fig. S36).
Structural refinement (Le Bail method) confirms their common orthorhombic perovskite phase (Pbnm; a = 8.639 Å, b = 8.953 Å, and c = 12.580 Å). However, there are clear differences in the 2D GIWAXS images because of the modified polycrystalline thin film texture, i.e. the relative orientation and distribution of crystal grains. The overall texture expression in the microgrid sample is driven by two anisotropic components. The first arises during annealing where the black perovskite forms a planar interface with the underlying substrate and introduces strain once cooled to RT. As-grown black CsPbI3 thin films thus exhibit well-defined variations their Bragg peak intensities in the azimuthal domain ( Fig. S37 and S38). The second texture component is made of intense hot spots in the scattering signal, due to the introduction of the embedded 3D interface. This manifests as narrow, intense rises the Bragg signals presented in the azimuthal domain ( Fig. S37 and S38). More examples of the signal hot spots generated by the microgrid are shown in Fig. S39, showing there random character.
Texture analysis: Given the relatively small size of the incident X-ray probe (beam dimensions of 80 × 30 µm 2 [H × V]), the anisotropy of the 40 µm squares does not average out to reform a signal akin the as-grown film. Within this experimental regime (i.e. relative size of the incident beam to the microgrid structure), quantitative estimates can be made regarding the population of grains being driven to form a microgrid-induced texture; full details are found in Fig. S40.      Here we evaluate the relative x-ray scattering contributions arising from the overlap of Textures 1 and 2 recorded from a polycrystalline, black CsPbI3 thin film. The GIWAXS beam H×V profile is roughly 50×100 μm at an incident angle of 1°, meaning that the incident footprint (several millimeters) encompasses many hundreds of grids. For a given azimuthal angle range, the area under the curve is assumed to be proportional to the scattering volume of crystal domains contributing to that particular texture expression. Texture 1 is shown to be an intrinsic expression of thermally treated CsPbI3 thin film atop glass. Thus, subtracting the Area 1 lineshape from Area 2 we can estimate the relative population of grains influenced to additionally express Texture 2 (introduced by the microgrid). Through this analysis we arrive at the relative ratio for Texture 1 and 2 of approximately 3:1, which is consistent across multiple samples processed with 40 μm grids. Note that Texture 2 will average out to Texture 1 with a large enough beam size. This value thus represents the lower bound, with the true value being possibly higher.

Supplementary Note 8. Ambient processed and stable CsPbI3 photodetectors integrated with a microgrid
Photodetector architecture: Thin film photodetectors we developed using a typical device architecture: ITO/NiOx/CsPbI3 (220 nm)/PCBM/BCP/Au. Here, an inverted p-i-n type device architecture was chosen with NiOx acting as the hole transport layer (HTL) and the phenyl-C 61butyric acid methyl ester /bathocuproine (PCBM/BCP) acting as the electron transport layers (ETL), respectively. Typically the HTL in inorganic perovskite devices must be able withstand high thermal treatments required to convert the CsPbI3 into the black-phase (>320 ͦ C), which mandates the use of inorganic metal oxide based HTLs. Among the several thermally stable metal oxide HTLs with good electrical properties reported thus far, NiOx based perovskite devices have led directly to progress in the field. Moreover, the combination of NiOx HTL and PCBM/BCP ETL are now well understood for their excellent charge extraction properties, and are widely used across several different types of perovskite devices (4)(5)(6). Here the requirement for a thermally robust HTL (due to high CsPbI3 processing temperature) also means it is compatible with laser patterning, whereby the integrated microgrid imposes no limitations on the device, i.e. beyond the thermal processing limits already imposed by using an active CsPbI3 perovskite layer. For the mixed halide device (Fig. S42), the same configuration was used with a perovskite layer which was grown with partial substitution of PbBr2 in the precursor solution.
Microprocessing of the thin films via photolithography was found to be easily controlled and highly reproducible. We noticed that the most impactful variable for the performance of devices was in fact the inherent quality of the perovskite film, formed largely during steps such as spin coating of the CsPbI3 film and deposition of the device carrier transport layers. This is because generating high-quality films consistently is a general issue for solution-processed perovskite materials, i.e. being influenced by factors like the chemist involved and environmental quality of the glovebox, or even the time of year (i.e. humidity and temperature). The CsPbI3 perovskite phase of solution processed films are extremely unstable and some batches of films, for example, possessed excess pin holes and defects. The presence/absence of such features is able to trigger premature yellow phase nucleation and was a main source of variably, and placed limitations on our ability to produce consistent devices (Table S1).
Photolithographic patterning of photodetector: The same processing parameters are used in all devices to pattern a 2×2 cm 2 microgrid area of a wafer; 40 μm grid size, 458 nm laser excitation with 300 kW/cm 2 power and a scanning speed of 10 mm/s. A photograph of such a processed thin film device is shown in Fig. 4B of the main text, along with a SEM image.
Device characterization:: Devices tested in an ambient environment we simply stored, exposed to the normal laboratory conditions (i.e. 45-50% RH). Devices tested in a nitrogen atmosphere (Fig. S44) we stored in a glovebox and transferred for characterization once a day through an isolated connection. Table S1. Performance metrics of stabilized CsPbI3 photodetector devices fashioned from different batches of solution processed films. All films have been stabilized with a microgrid and tested under 1 sun at an operating voltage of -0.5 V.

Fig. S43.
Tracking of dark and light (1 sun; -0.5 V) current for pure CsPbI3 devices kept in an ambient atmosphere (45-50% RH) for one week.

Fig. S44.
Rising and falling edges of one response cycle (~1 sun, 100 mW/cm 2 ) of a stabilized microprocessed CsPbI3 photodetectors operated at -0.5 V. The response time of the photocurrent is inset, which is equivalent to the response speed of the device. It is defined as the time required for the photodetector output signal to change from 10% to 90% of the peak level.